<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="ClientInformation.aspx.vb" Inherits="GTSWeb_ClientDetails" title="GTS Frieght Management System"  MaintainScrollPositionOnPostback="true" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" Runat="Server">
    <span><h3>Client Information</h3>
        <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataKeyNames="ClientID,ContactInfoId,LocationId"
            DataSourceID="ObjectDataSource1" Height="50px" Width="60%" CellPadding="4" ForeColor="#333333" GridLines="None">
            <Fields>
                <asp:BoundField DataField="ClientID" HeaderText="Client ID" ReadOnly="True" SortExpression="ClientID" Visible="False" />
                <asp:BoundField DataField="ContactInfoID" HeaderText="Contact Info ID" SortExpression="ContactInfoID" Visible="False" />
                <asp:BoundField DataField="ClientName" HeaderText="Client Name" SortExpression="ClientName" />
                <asp:TemplateField HeaderText="Status ID" SortExpression="StatusID">
                    <EditItemTemplate><asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="StatusSource" DataTextField="StatusName"
                            DataValueField="StatusID" SelectedValue='<%# Bind("StatusID") %>'>
                    </asp:DropDownList><asp:ObjectDataSource ID="StatusSource" runat="server" OldValuesParameterFormatString="original_{0}"
                            SelectMethod="getStatus" TypeName="GTSSystem.BLL.Status"></asp:ObjectDataSource>
                    </EditItemTemplate>
                    <InsertItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("StatusID") %>'></asp:TextBox>
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="StatusSource" DataTextField="StatusName"
                            DataValueField="StatusID" SelectedValue='<%# Bind("StatusID") %>' Visible="False">
                        </asp:DropDownList><asp:ObjectDataSource ID="StatusSource" runat="server" OldValuesParameterFormatString="original_{0}"
                            SelectMethod="getStatus" TypeName="GTSSystem.BLL.Status"></asp:ObjectDataSource>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Contract Start Date" SortExpression="ContractStartDate">
                    <EditItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("ContractStartDate") %>'></asp:Label>
                    </EditItemTemplate>
                    <InsertItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("ContractStartDate") %>'></asp:Label>
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("ContractStartDate") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Contract End Date" SortExpression="ContractEndDate">
                    <EditItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("ContractEndDate") %>'></asp:Label>
                    </EditItemTemplate>
                    <InsertItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("ContractEndDate") %>'></asp:Label>
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("ContractEndDate") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="LocationID" HeaderText="Location ID" SortExpression="LocationID" Visible="False" />
                <asp:BoundField DataField="ContactName" HeaderText="Contact Name" SortExpression="ContactName" />
                <asp:BoundField DataField="Phone" HeaderText="Phone" SortExpression="Phone" />
                <asp:BoundField DataField="Fax" HeaderText="Fax" SortExpression="Fax" />
                <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                <asp:BoundField DataField="StreetAddress" HeaderText="Street Address" SortExpression="StreetAddress" />
                <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
                <asp:BoundField DataField="ProvinceState" HeaderText="Province" SortExpression="ProvinceState" />
                <asp:BoundField DataField="Country" HeaderText="Country" SortExpression="Country" />
                <asp:BoundField DataField="PostalCode" HeaderText="Postal Code" SortExpression="PostalCode" />
                <asp:CommandField ShowEditButton="True" />
            </Fields>
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <CommandRowStyle BackColor="#E2DED6" Font-Bold="True" />
            <EditRowStyle BackColor="#999999" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" Height="20px" Width="100px" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        </asp:DetailsView>
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="{0}"
            SelectMethod="LookupClientbyClientId" TypeName="GTSSystem.BLL.Client" UpdateMethod="UpdateClient">
            <UpdateParameters>
                <asp:Parameter Name="ClientId" Type="Int32" />
                <asp:Parameter Name="ContactInfoId" Type="Int32" />
                <asp:Parameter Name="LocationId" Type="Int32" />
                <asp:Parameter Name="ClientName" Type="String" />
                <asp:Parameter Name="StatusId" Type="Int32" />
                <asp:Parameter Name="ContractStartDate" Type="DateTime" />
                <asp:Parameter Name="ContractEndDate" Type="DateTime" />
                <asp:Parameter Name="ContactName" Type="String" />
                <asp:Parameter Name="Phone" Type="String" />
                <asp:Parameter Name="Fax" Type="String" />
                <asp:Parameter Name="Email" Type="String" />
                <asp:Parameter Name="StreetAddress" Type="String" />
                <asp:Parameter Name="City" Type="String" />
                <asp:Parameter Name="ProvinceState" Type="String" />
                <asp:Parameter Name="Country" Type="String" />
                <asp:Parameter Name="PostalCode" Type="String" />
            </UpdateParameters>
            <SelectParameters>
                <asp:ProfileParameter Name="ClientId" PropertyName="ClientId" Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <span style="font-size: 12pt">
        </span></span>
</asp:Content>

